package cn.rocksolid.sport.assist.idcard;

import cn.rocksolid.sport.assist.entity.IdCardEntity;
import cn.rocksolid.sport.common.error.RSE;
import cn.rocksolid.sport.common.error.RockSolidException;
import org.apache.commons.collections4.MapUtils;

import java.util.Map;

public abstract class AbstractIdCardVerifier implements IdCardVerifier {

  protected Map<String, String> config;

  protected AbstractIdCardVerifier(Map<String, String> config) {
    if (MapUtils.isEmpty(config)) {
      throw new RockSolidException(RSE.INVALID_IVP_CONF);
    }
    this.config = config;
  }

  public Map<String, String> getConfig() {
    return this.config;
  }

  @Override
  public IdCardEntity verify(String number, String name) {
    throw new UnsupportedOperationException();
  }

  @Override
  public IdCardEntity verifyWithPhoto(String number, String name, String photo) {
    throw new UnsupportedOperationException();
  }
}
